<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>STRATEGIC CONSTRUCTION:  Fichier source de /Users/pierre-loupbarazzutti/Desktop/svn/silverstarlif7/projet/src/SDL_image.c</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">STRATEGIC CONSTRUCTION
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Généré par Doxygen 1.8.0 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Page&#160;principale</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Fichiers</span></a></li>
      <li><a href="dirs.html"><span>Répertoires</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Liste&#160;des&#160;fichiers</span></a></li>
      <li><a href="globals.html"><span>Membres&#160;de&#160;fichier</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('_s_d_l__image_8c.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">SDL_image.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_s_d_l__image_8c.html">Aller à la documentation de ce fichier.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include &quot;<a class="code" href="_s_d_l__image_8h.html">SDL_image.h</a>&quot;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include &lt;assert.h&gt;</span>
<a name="l00003"></a>00003 
<a name="l00004"></a><a class="code" href="_s_d_l__image_8h.html#a6a021954242aac9029b2d2fa22c81047">00004</a> <span class="keywordtype">void</span> <a class="code" href="_s_d_l__image_8c.html#a6a021954242aac9029b2d2fa22c81047">InitialisationImage</a> (<a class="code" href="structs_image.html">Image</a> * i)
<a name="l00005"></a>00005 {
<a name="l00006"></a>00006         (*i).imgdecor = (SDL_Surface**) malloc (21*<span class="keyword">sizeof</span> (SDL_Surface*));
<a name="l00007"></a>00007         (*i).imgdecor[0] = SDL_LoadBMP (<span class="stringliteral">&quot;data/plaine.bmp&quot;</span>);
<a name="l00008"></a>00008         (*i).imgdecor[1] = SDL_LoadBMP (<span class="stringliteral">&quot;data/arbre.bmp&quot;</span>);
<a name="l00009"></a>00009         (*i).imgdecor[2] = SDL_LoadBMP (<span class="stringliteral">&quot;data/mer.bmp&quot;</span>);
<a name="l00010"></a>00010         (*i).imgdecor[3] = SDL_LoadBMP (<span class="stringliteral">&quot;data/chantiercabane.bmp&quot;</span>);
<a name="l00011"></a>00011         (*i).imgdecor[4] = SDL_LoadBMP (<span class="stringliteral">&quot;data/cabane.bmp&quot;</span>);
<a name="l00012"></a>00012         (*i).imgdecor[5] = SDL_LoadBMP (<span class="stringliteral">&quot;data/mer2.bmp&quot;</span>);
<a name="l00013"></a>00013         (*i).imgdecor[6] = SDL_LoadBMP (<span class="stringliteral">&quot;data/mer3.bmp&quot;</span>);
<a name="l00014"></a>00014         (*i).imgdecor[7] = SDL_LoadBMP (<span class="stringliteral">&quot;data/mer4.bmp&quot;</span>);
<a name="l00015"></a>00015         (*i).imgdecor[8] = SDL_LoadBMP (<span class="stringliteral">&quot;data/mer5.bmp&quot;</span>);
<a name="l00016"></a>00016         (*i).imgdecor[9] = SDL_LoadBMP (<span class="stringliteral">&quot;data/caillou.bmp&quot;</span>);
<a name="l00017"></a>00017         (*i).imgdecor[10] = SDL_LoadBMP (<span class="stringliteral">&quot;data/arbrevrai2.bmp&quot;</span>);
<a name="l00018"></a>00018         (*i).imgdecor[11] = SDL_LoadBMP (<span class="stringliteral">&quot;data/arbrevrai3.bmp&quot;</span>);
<a name="l00019"></a>00019         (*i).imgdecor[12] = SDL_LoadBMP (<span class="stringliteral">&quot;data/arbrevrai4.bmp&quot;</span>);
<a name="l00020"></a>00020         (*i).imgdecor[13] = SDL_LoadBMP (<span class="stringliteral">&quot;data/arbrevrai5.bmp&quot;</span>);
<a name="l00021"></a>00021         (*i).imgdecor[14] = SDL_LoadBMP (<span class="stringliteral">&quot;data/arbrevrai6.bmp&quot;</span>);
<a name="l00022"></a>00022         (*i).imgdecor[15] = SDL_LoadBMP (<span class="stringliteral">&quot;data/arbrevrai7.bmp&quot;</span>);
<a name="l00023"></a>00023         (*i).imgdecor[16] = SDL_LoadBMP (<span class="stringliteral">&quot;data/peche1.bmp&quot;</span>);
<a name="l00024"></a>00024         (*i).imgdecor[17] = SDL_LoadBMP (<span class="stringliteral">&quot;data/peche2.bmp&quot;</span>);
<a name="l00025"></a>00025         (*i).imgdecor[18] = SDL_LoadBMP (<span class="stringliteral">&quot;data/peche3.bmp&quot;</span>);
<a name="l00026"></a>00026         (*i).imgdecor[19] = SDL_LoadBMP (<span class="stringliteral">&quot;data/Cabanerouge.bmp&quot;</span>);
<a name="l00027"></a>00027         (*i).imgdecor[20] = SDL_LoadBMP (<span class="stringliteral">&quot;data/Cabanebleu.bmp&quot;</span>);
<a name="l00028"></a>00028         
<a name="l00029"></a>00029         (*i).imgdecor2 = (SDL_Surface**) malloc (7*<span class="keyword">sizeof</span> (SDL_Surface*));
<a name="l00030"></a>00030         (*i).imgdecor2[0] = SDL_LoadBMP (<span class="stringliteral">&quot;data/pplaine.bmp&quot;</span>);
<a name="l00031"></a>00031         (*i).imgdecor2[1] = SDL_LoadBMP (<span class="stringliteral">&quot;data/parbre.bmp&quot;</span>);
<a name="l00032"></a>00032         (*i).imgdecor2[2] = SDL_LoadBMP (<span class="stringliteral">&quot;data/pmer.bmp&quot;</span>);
<a name="l00033"></a>00033         (*i).imgdecor2[3] = SDL_LoadBMP (<span class="stringliteral">&quot;data/pmaison.bmp&quot;</span>);
<a name="l00034"></a>00034         (*i).imgdecor2[4] = SDL_LoadBMP (<span class="stringliteral">&quot;data/rouge.bmp&quot;</span>);
<a name="l00035"></a>00035         (*i).imgdecor2[5] = SDL_LoadBMP (<span class="stringliteral">&quot;data/bleu.bmp&quot;</span>);
<a name="l00036"></a>00036         (*i).imgdecor2[6] = SDL_LoadBMP (<span class="stringliteral">&quot;data/pmontagne.bmp&quot;</span>);
<a name="l00037"></a>00037         
<a name="l00038"></a>00038         (*i).imgunite = (SDL_Surface**) malloc (30*<span class="keyword">sizeof</span> (SDL_Surface*));
<a name="l00039"></a>00039         (*i).imgunite[0] = SDL_LoadBMP (<span class="stringliteral">&quot;data/tomr.bmp&quot;</span>);
<a name="l00040"></a>00040         (*i).imgunite[1] = SDL_LoadBMP (<span class="stringliteral">&quot;data/patricr.bmp&quot;</span>);
<a name="l00041"></a>00041         (*i).imgunite[2] = SDL_LoadBMP (<span class="stringliteral">&quot;data/jojor.bmp&quot;</span>);
<a name="l00042"></a>00042         (*i).imgunite[3] = SDL_LoadBMP (<span class="stringliteral">&quot;data/bobir.bmp&quot;</span>);
<a name="l00043"></a>00043         (*i).imgunite[4] = SDL_LoadBMP (<span class="stringliteral">&quot;data/lulur.bmp&quot;</span>);
<a name="l00044"></a>00044         
<a name="l00045"></a>00045         (*i).imgunite[5] = SDL_LoadBMP (<span class="stringliteral">&quot;data/tomb.bmp&quot;</span>);
<a name="l00046"></a>00046         (*i).imgunite[6] = SDL_LoadBMP (<span class="stringliteral">&quot;data/patricb.bmp&quot;</span>);
<a name="l00047"></a>00047         (*i).imgunite[7] = SDL_LoadBMP (<span class="stringliteral">&quot;data/jojob.bmp&quot;</span>);
<a name="l00048"></a>00048         (*i).imgunite[8] = SDL_LoadBMP (<span class="stringliteral">&quot;data/bobib.bmp&quot;</span>);
<a name="l00049"></a>00049         (*i).imgunite[9] = SDL_LoadBMP (<span class="stringliteral">&quot;data/lulub.bmp&quot;</span>);
<a name="l00050"></a>00050         
<a name="l00051"></a>00051         
<a name="l00052"></a>00052         (*i).imgunite[10] = SDL_LoadBMP (<span class="stringliteral">&quot;data/tomRD.bmp&quot;</span>);
<a name="l00053"></a>00053         (*i).imgunite[11] = SDL_LoadBMP (<span class="stringliteral">&quot;data/tomRG.bmp&quot;</span>);
<a name="l00054"></a>00054         (*i).imgunite[12] = SDL_LoadBMP (<span class="stringliteral">&quot;data/patricRD.bmp&quot;</span>);
<a name="l00055"></a>00055         (*i).imgunite[13] = SDL_LoadBMP (<span class="stringliteral">&quot;data/patricRG.bmp&quot;</span>);
<a name="l00056"></a>00056         (*i).imgunite[14] = SDL_LoadBMP (<span class="stringliteral">&quot;data/jojoRD.bmp&quot;</span>);
<a name="l00057"></a>00057         (*i).imgunite[15] = SDL_LoadBMP (<span class="stringliteral">&quot;data/jojoRG.bmp&quot;</span>);
<a name="l00058"></a>00058         (*i).imgunite[16] = SDL_LoadBMP (<span class="stringliteral">&quot;data/bobiRD.bmp&quot;</span>);
<a name="l00059"></a>00059         (*i).imgunite[17] = SDL_LoadBMP (<span class="stringliteral">&quot;data/bobiRG.bmp&quot;</span>);
<a name="l00060"></a>00060         (*i).imgunite[18] = SDL_LoadBMP (<span class="stringliteral">&quot;data/luluRD.bmp&quot;</span>);
<a name="l00061"></a>00061         (*i).imgunite[19] = SDL_LoadBMP (<span class="stringliteral">&quot;data/luluRG.bmp&quot;</span>);
<a name="l00062"></a>00062         
<a name="l00063"></a>00063         (*i).imgunite[20] = SDL_LoadBMP (<span class="stringliteral">&quot;data/tomBD.bmp&quot;</span>);
<a name="l00064"></a>00064         (*i).imgunite[21] = SDL_LoadBMP (<span class="stringliteral">&quot;data/tomBG.bmp&quot;</span>);
<a name="l00065"></a>00065         (*i).imgunite[22] = SDL_LoadBMP (<span class="stringliteral">&quot;data/patricBD.bmp&quot;</span>);
<a name="l00066"></a>00066         (*i).imgunite[23] = SDL_LoadBMP (<span class="stringliteral">&quot;data/patricBG.bmp&quot;</span>);
<a name="l00067"></a>00067         (*i).imgunite[24] = SDL_LoadBMP (<span class="stringliteral">&quot;data/jojoBD.bmp&quot;</span>);
<a name="l00068"></a>00068         (*i).imgunite[25] = SDL_LoadBMP (<span class="stringliteral">&quot;data/jojoBG.bmp&quot;</span>);
<a name="l00069"></a>00069         (*i).imgunite[26] = SDL_LoadBMP (<span class="stringliteral">&quot;data/bobiBD.bmp&quot;</span>);
<a name="l00070"></a>00070         (*i).imgunite[27] = SDL_LoadBMP (<span class="stringliteral">&quot;data/bobiBG.bmp&quot;</span>);
<a name="l00071"></a>00071         (*i).imgunite[28] = SDL_LoadBMP (<span class="stringliteral">&quot;data/luluBD.bmp&quot;</span>);
<a name="l00072"></a>00072         (*i).imgunite[29] = SDL_LoadBMP (<span class="stringliteral">&quot;data/luluBG.bmp&quot;</span>);
<a name="l00073"></a>00073         
<a name="l00074"></a>00074         
<a name="l00075"></a>00075         (*i).imgcurseur = (SDL_Surface**) malloc (3*<span class="keyword">sizeof</span> (SDL_Surface*));
<a name="l00076"></a>00076         (*i).imgcurseur[0] = SDL_LoadBMP (<span class="stringliteral">&quot;data/curseurchoix.bmp&quot;</span>);
<a name="l00077"></a>00077         (*i).imgcurseur[1] = SDL_LoadBMP (<span class="stringliteral">&quot;data/curseurchoix2.bmp&quot;</span>);
<a name="l00078"></a>00078         (*i).imgcurseur[2] = SDL_LoadBMP (<span class="stringliteral">&quot;data/curseur.bmp&quot;</span>);
<a name="l00079"></a>00079         
<a name="l00080"></a>00080         (*i).imgfleche = (SDL_Surface**) malloc (6*<span class="keyword">sizeof</span> (SDL_Surface*));
<a name="l00081"></a>00081         (*i).imgfleche[0] = SDL_LoadBMP (<span class="stringliteral">&quot;data/flechegauche.bmp&quot;</span>);
<a name="l00082"></a>00082         (*i).imgfleche[1] = SDL_LoadBMP (<span class="stringliteral">&quot;data/flechebas.bmp&quot;</span>);
<a name="l00083"></a>00083         (*i).imgfleche[2] = SDL_LoadBMP (<span class="stringliteral">&quot;data/flechedroite.bmp&quot;</span>);
<a name="l00084"></a>00084         (*i).imgfleche[3] = SDL_LoadBMP (<span class="stringliteral">&quot;data/flechehaut.bmp&quot;</span>);
<a name="l00085"></a>00085         (*i).imgfleche[4] = SDL_LoadBMP (<span class="stringliteral">&quot;data/barrehorizontale.bmp&quot;</span>);
<a name="l00086"></a>00086         (*i).imgfleche[5] = SDL_LoadBMP (<span class="stringliteral">&quot;data/barreverticale.bmp&quot;</span>);
<a name="l00087"></a>00087         
<a name="l00088"></a>00088         (*i).imgicone = (SDL_Surface**) malloc (16*<span class="keyword">sizeof</span> (SDL_Surface*));
<a name="l00089"></a>00089         (*i).imgicone[0] = SDL_LoadBMP (<span class="stringliteral">&quot;data/cabaneicone.bmp&quot;</span>);
<a name="l00090"></a>00090         (*i).imgicone[1] = SDL_LoadBMP (<span class="stringliteral">&quot;data/findetour.bmp&quot;</span>);
<a name="l00091"></a>00091         (*i).imgicone[2] = SDL_LoadBMP (<span class="stringliteral">&quot;data/popupr.bmp&quot;</span>);
<a name="l00092"></a>00092         (*i).imgicone[3] = SDL_LoadBMP (<span class="stringliteral">&quot;data/popupb.bmp&quot;</span>);
<a name="l00093"></a>00093         (*i).imgicone[4] = SDL_LoadBMP (<span class="stringliteral">&quot;data/sauvegarder.bmp&quot;</span>);
<a name="l00094"></a>00094         (*i).imgicone[5] = SDL_LoadBMP (<span class="stringliteral">&quot;data/popup.bmp&quot;</span>);
<a name="l00095"></a>00095         (*i).imgicone[6] = SDL_LoadBMP (<span class="stringliteral">&quot;data/popup2.bmp&quot;</span>);
<a name="l00096"></a>00096         (*i).imgicone[7] = SDL_LoadBMP (<span class="stringliteral">&quot;data/quitter.bmp&quot;</span>);
<a name="l00097"></a>00097         (*i).imgicone[8] = SDL_LoadBMP (<span class="stringliteral">&quot;data/popupsauv.bmp&quot;</span>);
<a name="l00098"></a>00098         (*i).imgicone[9] = SDL_LoadBMP (<span class="stringliteral">&quot;data/plaineicone.bmp&quot;</span>);
<a name="l00099"></a>00099         (*i).imgicone[10] = SDL_LoadBMP (<span class="stringliteral">&quot;data/arbreicone.bmp&quot;</span>);
<a name="l00100"></a>00100         (*i).imgicone[11] = SDL_LoadBMP (<span class="stringliteral">&quot;data/mericone.bmp&quot;</span>);
<a name="l00101"></a>00101         (*i).imgicone[12] = SDL_LoadBMP (<span class="stringliteral">&quot;data/caillouicone.bmp&quot;</span>);
<a name="l00102"></a>00102         (*i).imgicone[13] = SDL_LoadBMP (<span class="stringliteral">&quot;data/popupreinit.bmp&quot;</span>);
<a name="l00103"></a>00103         (*i).imgicone[14] = SDL_LoadBMP (<span class="stringliteral">&quot;data/popupmapsauv.bmp&quot;</span>);
<a name="l00104"></a>00104         (*i).imgicone[15] = SDL_LoadBMP (<span class="stringliteral">&quot;data/popuppassauv.bmp&quot;</span>);
<a name="l00105"></a>00105         
<a name="l00106"></a>00106         (*i).imgusine = (SDL_Surface**) malloc (5*<span class="keyword">sizeof</span> (SDL_Surface*));
<a name="l00107"></a>00107         (*i).imgusine[0] = SDL_LoadBMP (<span class="stringliteral">&quot;data/fondusine.bmp&quot;</span>);
<a name="l00108"></a>00108         (*i).imgusine[1] = SDL_LoadBMP (<span class="stringliteral">&quot;data/fondcombat.bmp&quot;</span>);
<a name="l00109"></a>00109         (*i).imgusine[2] = SDL_LoadBMP (<span class="stringliteral">&quot;data/jaugerouge.bmp&quot;</span>);
<a name="l00110"></a>00110         (*i).imgusine[3] = SDL_LoadBMP (<span class="stringliteral">&quot;data/jaugebleu.bmp&quot;</span>);
<a name="l00111"></a>00111         (*i).imgusine[4] = SDL_LoadBMP (<span class="stringliteral">&quot;data/fight.bmp&quot;</span>);
<a name="l00112"></a>00112         
<a name="l00113"></a>00113         (*i).imgmenuprinc = (SDL_Surface**) malloc (15*<span class="keyword">sizeof</span> (SDL_Surface*));
<a name="l00114"></a>00114         (*i).imgmenuprinc[0] = SDL_LoadBMP (<span class="stringliteral">&quot;data/menuprinc.bmp&quot;</span>);
<a name="l00115"></a>00115         (*i).imgmenuprinc[1] = SDL_LoadBMP (<span class="stringliteral">&quot;data/menuprinc2.bmp&quot;</span>);
<a name="l00116"></a>00116         (*i).imgmenuprinc[2] = SDL_LoadBMP (<span class="stringliteral">&quot;data/casenn.bmp&quot;</span>);
<a name="l00117"></a>00117         (*i).imgmenuprinc[3] = SDL_LoadBMP (<span class="stringliteral">&quot;data/caseoui.bmp&quot;</span>);        
<a name="l00118"></a>00118         (*i).imgmenuprinc[4] = SDL_LoadBMP (<span class="stringliteral">&quot;data/joueur1.bmp&quot;</span>);
<a name="l00119"></a>00119         (*i).imgmenuprinc[5] = SDL_LoadBMP (<span class="stringliteral">&quot;data/joueur2.bmp&quot;</span>);
<a name="l00120"></a>00120         (*i).imgmenuprinc[6] = SDL_LoadBMP (<span class="stringliteral">&quot;data/fait.bmp&quot;</span>);
<a name="l00121"></a>00121         (*i).imgmenuprinc[7] = SDL_LoadBMP (<span class="stringliteral">&quot;data/optionfond.bmp&quot;</span>);
<a name="l00122"></a>00122         (*i).imgmenuprinc[8] = SDL_LoadBMP (<span class="stringliteral">&quot;data/editeur.bmp&quot;</span>);
<a name="l00123"></a>00123         (*i).imgmenuprinc[9] = SDL_LoadBMP (<span class="stringliteral">&quot;data/url.bmp&quot;</span>);
<a name="l00124"></a>00124         (*i).imgmenuprinc[10] = SDL_LoadBMP (<span class="stringliteral">&quot;data/retour.bmp&quot;</span>);
<a name="l00125"></a>00125         (*i).imgmenuprinc[11] = SDL_LoadBMP (<span class="stringliteral">&quot;data/musique.bmp&quot;</span>);
<a name="l00126"></a>00126         (*i).imgmenuprinc[12] = SDL_LoadBMP (<span class="stringliteral">&quot;data/bruitage.bmp&quot;</span>);
<a name="l00127"></a>00127         (*i).imgmenuprinc[13] = SDL_LoadBMP (<span class="stringliteral">&quot;data/menuprinc3.bmp&quot;</span>);
<a name="l00128"></a>00128         (*i).imgmenuprinc[14] = SDL_LoadBMP (<span class="stringliteral">&quot;data/plus.bmp&quot;</span>);
<a name="l00129"></a>00129 }
<a name="l00130"></a>00130 
<a name="l00131"></a><a class="code" href="_s_d_l__image_8h.html#a52c7fb43e84266a16cc2f7e3530eaedc">00131</a> <span class="keywordtype">void</span> <a class="code" href="_s_d_l__image_8c.html#a52c7fb43e84266a16cc2f7e3530eaedc">DestructionImage</a> (<a class="code" href="structs_image.html">Image</a> * i)
<a name="l00132"></a>00132 {
<a name="l00133"></a>00133         <span class="keywordtype">int</span> j;
<a name="l00134"></a>00134         <span class="keywordflow">for</span> (j = 0; j &lt; 21; j++)
<a name="l00135"></a>00135         {
<a name="l00136"></a>00136                 SDL_FreeSurface((*i).imgdecor[j]);
<a name="l00137"></a>00137         }
<a name="l00138"></a>00138         free((*i).imgdecor);
<a name="l00139"></a>00139         (*i).imgdecor = NULL;
<a name="l00140"></a>00140         <span class="keywordflow">for</span> (j = 0; j &lt; 7; j++)
<a name="l00141"></a>00141         {
<a name="l00142"></a>00142                 SDL_FreeSurface((*i).imgdecor2[j]);
<a name="l00143"></a>00143         }
<a name="l00144"></a>00144         free((*i).imgdecor2);
<a name="l00145"></a>00145         (*i).imgdecor2 = NULL;
<a name="l00146"></a>00146         <span class="keywordflow">for</span> (j = 0; j &lt; 30; j++)
<a name="l00147"></a>00147         {
<a name="l00148"></a>00148                 SDL_FreeSurface((*i).imgunite[j]);
<a name="l00149"></a>00149         }
<a name="l00150"></a>00150         free((*i).imgunite);
<a name="l00151"></a>00151         (*i).imgunite = NULL;
<a name="l00152"></a>00152         <span class="keywordflow">for</span> (j = 0; j &lt; 3; j++)
<a name="l00153"></a>00153         {
<a name="l00154"></a>00154                 SDL_FreeSurface((*i).imgcurseur[j]);
<a name="l00155"></a>00155         }
<a name="l00156"></a>00156         free((*i).imgcurseur);
<a name="l00157"></a>00157         (*i).imgcurseur = NULL;
<a name="l00158"></a>00158         <span class="keywordflow">for</span> (j = 0; j &lt; 6; j++)
<a name="l00159"></a>00159         {
<a name="l00160"></a>00160                 SDL_FreeSurface((*i).imgfleche[j]);
<a name="l00161"></a>00161         }
<a name="l00162"></a>00162         free((*i).imgfleche);
<a name="l00163"></a>00163         (*i).imgfleche = NULL;
<a name="l00164"></a>00164         <span class="keywordflow">for</span> (j = 0; j &lt; 16; j++)
<a name="l00165"></a>00165         {
<a name="l00166"></a>00166                 SDL_FreeSurface((*i).imgicone[j]);
<a name="l00167"></a>00167         }
<a name="l00168"></a>00168         free((*i).imgicone);
<a name="l00169"></a>00169         (*i).imgicone = NULL;
<a name="l00170"></a>00170         <span class="keywordflow">for</span> (j = 0; j &lt; 5; j++)
<a name="l00171"></a>00171         {
<a name="l00172"></a>00172                 SDL_FreeSurface((*i).imgusine[j]);
<a name="l00173"></a>00173         }
<a name="l00174"></a>00174         free((*i).imgusine);
<a name="l00175"></a>00175         (*i).imgusine = NULL;
<a name="l00176"></a>00176         <span class="keywordflow">for</span> (j = 0; j &lt; 15; j++)
<a name="l00177"></a>00177         {
<a name="l00178"></a>00178                 SDL_FreeSurface((*i).imgmenuprinc[j]);
<a name="l00179"></a>00179         }
<a name="l00180"></a>00180         free((*i).imgmenuprinc);
<a name="l00181"></a>00181         (*i).imgmenuprinc = NULL;
<a name="l00182"></a>00182 }
<a name="l00183"></a>00183 
<a name="l00184"></a><a class="code" href="_s_d_l__image_8h.html#a7d2859b16f3b9198de66d19b2ed5859d">00184</a> <span class="keywordtype">void</span> <a class="code" href="_s_d_l__image_8c.html#a7d2859b16f3b9198de66d19b2ed5859d">ImageTestRegression</a>()
<a name="l00185"></a>00185 {
<a name="l00186"></a>00186         <a class="code" href="structs_image.html">Image</a> * itest = (<a class="code" href="structs_image.html">Image</a>*) malloc (<span class="keyword">sizeof</span> (<a class="code" href="structs_image.html">Image</a>));
<a name="l00187"></a>00187         <span class="keywordtype">int</span> j;
<a name="l00188"></a>00188         
<a name="l00189"></a>00189         <span class="comment">/* Vérification de la procédure InitialisationImage */</span>
<a name="l00190"></a>00190         <a class="code" href="_s_d_l__image_8c.html#a6a021954242aac9029b2d2fa22c81047">InitialisationImage</a>(itest);
<a name="l00191"></a>00191         
<a name="l00192"></a>00192         assert( (*itest).imgdecor != NULL);
<a name="l00193"></a>00193         <span class="keywordflow">for</span> (j = 0; j &lt; 21; j++)
<a name="l00194"></a>00194         {
<a name="l00195"></a>00195                 assert( (*itest).imgdecor[j] != NULL);
<a name="l00196"></a>00196         }
<a name="l00197"></a>00197         
<a name="l00198"></a>00198         assert( (*itest).imgdecor2 != NULL);
<a name="l00199"></a>00199         <span class="keywordflow">for</span> (j = 0; j &lt; 7; j++)
<a name="l00200"></a>00200         {
<a name="l00201"></a>00201                 assert( (*itest).imgdecor2[j] != NULL);
<a name="l00202"></a>00202         }
<a name="l00203"></a>00203         
<a name="l00204"></a>00204         assert( (*itest).imgunite != NULL);
<a name="l00205"></a>00205         <span class="keywordflow">for</span> (j = 0; j &lt; 30; j++)
<a name="l00206"></a>00206         {
<a name="l00207"></a>00207                 assert( (*itest).imgunite[j] != NULL);
<a name="l00208"></a>00208         }
<a name="l00209"></a>00209         
<a name="l00210"></a>00210         assert( (*itest).imgcurseur != NULL);
<a name="l00211"></a>00211         <span class="keywordflow">for</span> (j = 0; j &lt; 3; j++)
<a name="l00212"></a>00212         {
<a name="l00213"></a>00213                 assert( (*itest).imgcurseur[j] != NULL);
<a name="l00214"></a>00214         }
<a name="l00215"></a>00215         
<a name="l00216"></a>00216         assert( (*itest).imgfleche != NULL);
<a name="l00217"></a>00217         <span class="keywordflow">for</span> (j = 0; j &lt; 6; j++)
<a name="l00218"></a>00218         {
<a name="l00219"></a>00219                 assert( (*itest).imgfleche[j] != NULL);
<a name="l00220"></a>00220         }
<a name="l00221"></a>00221         
<a name="l00222"></a>00222         assert( (*itest).imgicone != NULL);
<a name="l00223"></a>00223         <span class="keywordflow">for</span> (j = 0; j &lt; 16; j++)
<a name="l00224"></a>00224         {
<a name="l00225"></a>00225                 assert( (*itest).imgicone[j] != NULL);
<a name="l00226"></a>00226         }
<a name="l00227"></a>00227         
<a name="l00228"></a>00228         assert( (*itest).imgusine != NULL);
<a name="l00229"></a>00229         <span class="keywordflow">for</span> (j = 0; j &lt; 5; j++)
<a name="l00230"></a>00230         {
<a name="l00231"></a>00231                 assert( (*itest).imgusine[j] != NULL);
<a name="l00232"></a>00232         }
<a name="l00233"></a>00233         
<a name="l00234"></a>00234         assert( (*itest).imgmenuprinc != NULL);
<a name="l00235"></a>00235         <span class="keywordflow">for</span> (j = 0; j &lt; 15; j++)
<a name="l00236"></a>00236         {
<a name="l00237"></a>00237                 assert( (*itest).imgmenuprinc[j] != NULL);
<a name="l00238"></a>00238         }
<a name="l00239"></a>00239         
<a name="l00240"></a>00240         <span class="comment">/* Vérification de la procédure DestructionImage */</span>
<a name="l00241"></a>00241         <a class="code" href="_s_d_l__image_8c.html#a52c7fb43e84266a16cc2f7e3530eaedc">DestructionImage</a>(itest);
<a name="l00242"></a>00242         
<a name="l00243"></a>00243         assert( (*itest).imgdecor == NULL);
<a name="l00244"></a>00244         assert( (*itest).imgdecor2 == NULL);
<a name="l00245"></a>00245         assert( (*itest).imgunite == NULL);
<a name="l00246"></a>00246         assert( (*itest).imgcurseur == NULL);
<a name="l00247"></a>00247         assert( (*itest).imgfleche == NULL);
<a name="l00248"></a>00248         assert( (*itest).imgicone == NULL);
<a name="l00249"></a>00249         assert( (*itest).imgusine == NULL);
<a name="l00250"></a>00250         assert( (*itest).imgmenuprinc == NULL);
<a name="l00251"></a>00251         
<a name="l00252"></a>00252 }
</pre></div></div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="_s_d_l__image_8c.html">SDL_image.c</a>      </li>

    <li class="footer">Généré le Jeudi Juin 7 2012 11:43:12 pour STRATEGIC CONSTRUCTION par
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.0 </li>
   </ul>
 </div>


</body>
</html>
